package com.maimao.auth.service;

import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;

/**
 * @author wangmaolin
 */
public interface MMUserDetailsService extends UserDetailsService {
    /**
     * 根据电话号码查询用户
     * @param mobile 手机号
     * @return 用户
     */
    UserDetails loadUserByMobile(String mobile);

    /**
     * 根据邮箱查询用户
     * @param email 邮箱
     * @return 用户
     */
    UserDetails loadUserByEmail(String email);
}
